package it.yuzuojian.com.mapper;

import it.yuzuojian.com.javaBean.ArticleTags;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface ArticleTagsMapper {
    @Insert("insert into articletags values(null,#{articleId},#{tagId})")
    void add(ArticleTags articleTags);
    @Delete("delete from articleTags where articleId=#{id}")
    void deleteByArticleId(Integer articleId);

    @Delete("delete from articleTags where tagId=#{tagId}")
    void deleteByTagId(Integer tagId);

}
